import poplib

pp = poplib.POP3('pop3.163.com')
# pp.set_debuglevel(1)
pp.user('itsky365@163.com')
pp.pass_('itsky365zhuxh')
pp_stat = pp.stat()
print(pp_stat)

# for i in range(1, ret[0] + 1):
# mlist = pp.top(i, 0)
# print('line: %s' % len(mlist[1]))

pp_list = pp.list()
print(pp_list)

pp_retr1 = pp.retr(1)
for line in pp_retr1[1]:
    print(line)
